<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">H3C CAS云管理平台</div>
</div>
<div id="jd-header">
<h1>查询CAS系统中主机池下的主机及集群列表</h1>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>查询CAS系统中主机池下的主机及集群列表</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/hostpool/{hpId}/allChildNode</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>GET</dd>
  <dt><b>参数</b></dt>
  <table id="pubmethods" class="jd-sumtable"><tbody><tr>
          <th colspan="2">路径参数（Path Parameter）</th>
        </tr>

	        <tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">hpId</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">主机池id 。</span>
              <div class="jd-descrdiv">长整数（long）类型。必须。</div>	          </td>
	        </tr>
        </table>
  </dl>
<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b>状态码</b></dt>
  <dd>
  <ul>
    <li>200(OK)：成功。</li>
  </ul>
  </dd>
  <dt><b>消息头</b></dt>
  <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Server: H3C-CVM<br>Content-Type: application/xml<br>Content-Length: 667<br>Date: Tue, 16 Sep 2014 07:04:33 GMT
  </pre>
  </div>
  <dt><b>消息体</b></dt>
  <div class="source">
    <pre class="prettyprint lang-xml">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;nodeList&gt;
  &lt;clusterList&gt;
    &lt;id&gt;1&lt;/id&gt;
    &lt;hostPoolId&gt;2&lt;/hostPoolId&gt;
    &lt;name&gt;提供虚拟机CVK&lt;/name&gt;
    &lt;description/&gt;
    &lt;enableHA&gt;0&lt;/enableHA&gt;
    &lt;priority&gt;3&lt;/priority&gt;
    &lt;enableLB&gt;0&lt;/enableLB&gt;
    &lt;persistTime&gt;0&lt;/persistTime&gt;
    &lt;checkInterval&gt;0&lt;/checkInterval&gt;
    &lt;enableIPM&gt;0&lt;/enableIPM&gt;
    &lt;persistTimeIPM&gt;0&lt;/persistTimeIPM&gt;
    &lt;checkIntervalIPM&gt;0&lt;/checkIntervalIPM&gt;
    &lt;operatorGroupId&gt;0&lt;/operatorGroupId&gt;
    &lt;operatorGroupCode/&gt;
    &lt;childNum&gt;5&lt;/childNum&gt;
  &lt;/clusterList&gt;
  &lt;hostList&gt;
    &lt;id&gt;107&lt;/id&gt;
    &lt;user&gt;root&lt;/user&gt;
    &lt;pwd&gt;1q2w3e&lt;/pwd&gt;
    &lt;hostPoolId&gt;2&lt;/hostPoolId&gt;
    &lt;name&gt;cvm80&lt;/name&gt;
    &lt;ip&gt;192.168.10.80&lt;/ip&gt;
    &lt;status&gt;1&lt;/status&gt;
    &lt;haEnable&gt;1&lt;haEnable&gt;
  &lt;/hostList&gt;
&lt;/nodeList&gt;</pre>
  </div>
</dl>
<dt><a name="detail"></a><b>元素含义</b></dt>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">clusterList</span>各子元素</th>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">集群 ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">hostPoolId</span></td>
      <td class="jd-linkcol"><span class="sympad">主机池 ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol"><span class="sympad">集群名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">description</span></td>
      <td class="jd-linkcol"><span class="sympad">集群描述。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">enableHA</span></td>
      <td class="jd-linkcol"><span class="sympad">是否启用HA，枚举值：1=启用，0=不启用。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">priority</span></td>
      <td class="jd-linkcol"><span class="sympad">集群启动优先级，枚举值：0：低级，1：中级，2：高级。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">enableLB</span></td>
      <td class="jd-linkcol"><span class="sympad">是否启用LB，0：不启用负载均衡 1：启用负载均衡。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">persistTime</span></td>
      <td class="jd-linkcol"><span class="sympad">持续时间。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">checkInterval</span></td>
      <td class="jd-linkcol"><span class="sympad">检查间隔时长。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">enableIPM</span></td>
      <td class="jd-linkcol"><span class="sympad">是否启用电源智能管理， 0：不启用电源智能管理 1：启用电源智能管理。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">persistTimeIPM</span></td>
      <td class="jd-linkcol"><span class="sympad">持续时间。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">ipmLowerMonitorId</span></td>
      <td class="jd-linkcol"><span class="sympad">主机回收监控策略ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">ipmLowerMonitorName</span></td>
      <td class="jd-linkcol"><span class="sympad">主机回收监控策略名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">ipmUpperMonitorId</span></td>
      <td class="jd-linkcol"><span class="sympad">主机扩展监控策略ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">ipmUpperMonitorName</span></td>
      <td class="jd-linkcol"><span class="sympad">主机扩展监控策略名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">checkIntervalIPM</span></td>
      <td class="jd-linkcol"><span class="sympad">检查间隔。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">operatorGroupId</span></td>
      <td class="jd-linkcol"><span class="sympad">操作员分组ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">operatorGroupCode</span></td>
      <td class="jd-linkcol"><span class="sympad">操作员分组编号。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">childNum</span></td>
      <td class="jd-linkcol"><span class="sympad">直接子节点数量。集群下的主机数量。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
</table>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">hostList</span>各子元素</th>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">主机 ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">user</span></td>
      <td class="jd-linkcol"><span class="sympad">访问主机用户名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">pwd</span></td>
      <td class="jd-linkcol"><span class="sympad">访问主机密码。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">hostPoolId</span></td>
      <td class="jd-linkcol"><span class="sympad">主机池 ID。</span>
          <div class="jd-descrdiv">长整型（Long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol"><span class="sympad">主机名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">ip</span></td>
      <td class="jd-linkcol"><span class="sympad">服务器IP地址。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">status</span></td>
      <td class="jd-linkcol"><span class="sympad">主机状态， 0：不正常，1：正常。</span>
          <div class="jd-descrdiv">整型（Integer）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">haEnable</span></td>
      <td class="jd-linkcol"><span class="sympad">主机HA状态。</span>
        <div class="jd-descrdiv">整型（Integer）类型。0表示主机未在HA中，1表示主机在HA中。</div></td>
    </tr>
</table>
<p>&nbsp;</p>
<h2><a name="example"></a>应用举例</h2>
    <p>1.查询CAS系统中ID为“2”的主机池的主机及集群列表。</p>
    <dl>
      <dt><b>请求</b></dt>
      <div class="source">
        <pre class="prettyprint lang-xml">GET http://localhost:8080/cas/casrs/hostpool/2/allChildNode
accept: application/xml
...
        </pre>
      </div>
      <dt><b>回应</b></dt>
      <div class="source">
       <pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Server: H3C-CVM<br>Content-Type: application/xml<br>Content-Length: 667<br>Date: Tue, 16 Sep 2014 07:04:33 GMT

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;nodeList&gt;
  &lt;clusterList&gt;
    &lt;id&gt;1&lt;/id&gt;
    &lt;hostPoolId&gt;2&lt;/hostPoolId&gt;
    &lt;name&gt;提供虚拟机CVK&lt;/name&gt;
    &lt;description/&gt;
    &lt;enableHA&gt;0&lt;/enableHA&gt;
    &lt;priority&gt;3&lt;/priority&gt;
    &lt;enableLB&gt;0&lt;/enableLB&gt;
    &lt;persistTime&gt;0&lt;/persistTime&gt;
    &lt;checkInterval&gt;0&lt;/checkInterval&gt;
    &lt;enableIPM&gt;0&lt;/enableIPM&gt;
    &lt;persistTimeIPM&gt;0&lt;/persistTimeIPM&gt;
    &lt;checkIntervalIPM&gt;0&lt;/checkIntervalIPM&gt;
    &lt;operatorGroupId&gt;0&lt;/operatorGroupId&gt;
    &lt;operatorGroupCode/&gt;
    &lt;childNum&gt;5&lt;/childNum&gt;
  &lt;/clusterList&gt;
  &lt;hostList&gt;
    &lt;id&gt;107&lt;/id&gt;
    &lt;user&gt;root&lt;/user&gt;
    &lt;pwd&gt;1q2w3e&lt;/pwd&gt;
    &lt;hostPoolId&gt;2&lt;/hostPoolId&gt;
    &lt;name&gt;cvm80&lt;/name&gt;
    &lt;ip&gt;192.168.10.80&lt;/ip&gt;
    &lt;status&gt;1&lt;/status&gt;
    &lt;haEnable&gt;1&lt;haEnable&gt;
  &lt;/hostList&gt;
&lt;/nodeList&gt;</pre>
      </div>
    </dl>
    </div>
</div>
</div>
</body>
</html>